import axios from '@/http/api' // 导入 api

// 单独导出
// 主题首页
//根据关键字搜索歌曲
export const Search = params => {
  return axios({
    url: '/api/search',
    method: 'get',
    params
  })
}
//根据Id搜索url
const SongUrl = params => {
  return axios({
    url: '/api/song/url',
    method: 'get',
    params
  })
}
//根据id搜索封面
const SongCover = params =>{
  return axios({
    url:'/api/song/detail',
    method:'get',
    params
  })
}
//根据id获得评论
const HotComment = params =>{
  return axios({
    url:'/api/comment/hot',
    method: 'get',
    params
  })
}
//根据mvid获得mv
const PlayMv=params=>{
  return axios({
    url:'/api/mv/url',
    method:'get',
    params
  })
}
//发送验证码
const Verification =params=>{
  return axios({
    url: '/api/captcha/sent',
    method:'get',
    params
  })
}
//输入验证码校验是否成功
const Check=params=>{
  return axios({
    url: '/api//captcha/verify',
    method:'get',
    params
  })
}
// 主题收藏
export const topicCollect = data => {
  return axios({
    url: '',
    method: 'post',
    data
  })
}

// 默认全部倒出
export default {
  Search,
  topicCollect,
  SongUrl,
  SongCover,
  HotComment,
  PlayMv,
  Verification,
  Check  
}